import pandas as pd
import matplotlib.pyplot as plt

# 读取CSV文件
data = pd.read_csv('data_resource\\radiation_data.csv')
# 转换时间列为日期时间格式
data['timestamp'] = pd.to_datetime(data['timestamp'])
# print(data['timestamp'])
# print(data['concentration'])
# 绘制放射性物质浓度随时间的变化
plt.figure(figsize=(10, 6))
plt.plot(data['timestamp'], data['concentration'], marker='o')
plt.xlabel('time')
plt.ylabel('Concentration of radioactive material')
plt.title('Radioactive material concentration changes')
plt.xticks(rotation=45)
plt.grid(True)
plt.show()